<?php $userlevel = $this->session->userdata('userlevel'); ?>
<div id="wrapper-content" align="left">

    <table class="titrepage" width="100%">
        <tr>              
            <td >La liste des gardients</td>
            <td align="right">Total | <?php echo $total ?> </td>
        </tr>
    </table>
    <table width="100%" class="list">
        <thead>
            <tr>
                <th>Avatar</th>
                <th>Ident</th>
                <th>Name</th>
                <th>Addresse</th>
                <th>Experience</th>
                <th>Disponible</th>
            </tr>
        </thead>
        <?php foreach ($query as $aRow): ?>
            <tr>
                <td><img width="125px" src="<?php echo base_url();?>assets/thumb/<?php echo $aRow['img'];?>"></td>
                <td><?php echo $aRow['ident']; ?></td>
                <td><?php echo $aRow['first_name'].' '. $aRow['last_name'];?></td>
                <td><?php echo $aRow['addr']; ?></td>
                <td><?php echo $aRow['experience']; ?></td>
                <td><?php if ($aRow['disponible'] == 1)
                echo "Oui"; else
                echo "Non"; ?></td>
                <!--<td width="70px">
<?php if ($userlevel > $aRow['droit']) { ?>
                <a class="supprimer" href="#" ><img border="0"src="<?php echo base_url() . 'assets/admin/' ?>images/supprimer.png"/></a>
                <div style="display:none">
		    	Confirmer <br/>
                    <a href="<?php echo site_url('seating_admin/delete_admin') . "/" . $aRow['id'] ?>"> <img border="0"src="<?php echo base_url() . 'assets/admin/' ?>images/oui.png"/></a>
                    <a class="non" href="#" ><img  border="0"src="<?php echo base_url() . 'assets/admin/' ?>images/non.png"/></a>
                    </div>
                <?php } else {
 ?>
                    Aucun droit
        <?php } ?>
                    </td>-->
                <td><a href="<?php echo site_url('seating_admin/profile')."/".$aRow['id']?>">Profile</a></td>
                <td><a href="<?php echo site_url('seating_admin/delete_gardient')."/".$aRow['id']?>">Suprimmer</a></td>
                </tr>
        <?php endforeach; ?>
                </table>
<?php echo $pagination; ?>
    
    <div class="bajouter" align="center">Ajouter nouveau gardient</div>
    <div style="margin:10px 0px 10px 0px;display:none;">
    <?php echo form_open('seating_admin/add_gardient') ?>
    <div id="viewactu" align="center">
        <table id="formactu" cellpadding="10px" cellspacing="0">
            <tr> <td>Nom</td> <td><input type="text" name="first_name" value="<?php echo set_value('first_name'); ?>"/></td> </tr>
            <tr> <td>Prenom</td> <td><input type="text" name="last_name" value="<?php echo set_value('last_name'); ?>"/></td> </tr>
            <tr> <td>Identifiant</td> <td><input type="text" name="ident" value="<?php echo set_value('ident'); ?>"/></td> </tr>
            <tr> <td>Mot de passe</td> <td><input type="password" name="pass"/></td> </tr>
            <tr> <td>Confirmation Mot de passe</td> <td><input type="password" name="confirm_pass"/></td> </tr>
            <tr> <td></td> <td><input type="submit" name="submit"/></td> </tr>
        </table>
    </div>
    <?php echo form_close() ?>
</div>
<!--END wrapper-content-->
